﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Common
{
    [DataContract]
    public class Section : HsePSObject
    {
        public Section()
        {
            ID = Guid.NewGuid().ToString();
            Articles = new List<Article>();
            CreationTime = DateTime.Now;
        }

        [DataMember]
        public string ParentID { get; set; }
        [DataMember]
        public string ID { get; set; }
        [DataMember]
        public string Title { get; set; }
        [DataMember]
        public string Description { get; set; }
        [DataMember]
        public DateTime CreationTime { get; private set; }
        [DataMember]
        public List<Article> Articles { get; private set; }
    }

    public class SectionArticle
    {
        public SectionArticle()
        {
            this.ID = Guid.NewGuid().ToString();
        }

        public string ID { get; set; }
        public string ArticleID { get; set; }
        public string SectionID { get; set; }
    }
}